package com.cnhis.cloudhealth.clinical.util;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Map;

public class URLEncodedUtils {

	public static void decodeMap(Map<String,String>  map ) {
		//Map<Integer, Integer> map = new HashMap<Integer, Integer>(); 
		for (Map.Entry<String,String>  entry : map.entrySet()) { 
			map.put(entry.getKey(), decode(entry.getValue()));
		 // System.out.println("Key = " +  + ", Value = " + ); 
		}
		// for(map)
	}

	private static String decode(String value) {
		  
		try {
			return URLDecoder.decode(value, "utf8");
		} catch (UnsupportedEncodingException e) {
			throw  new RuntimeException(e);
		}
	}

}
